// 导入首页
import Index from "@/pages/Index";
// 导入登录页
import Login from "@/pages/Login";
// antX
import AntX from "@/pages/antX";

import IndexDetail from "@/pages/IndexDetail";
import About from "@/pages/About";
import UserInfo from "@/pages/About/UserInfo";

import NotFound from "@/pages/Error/404NotFound";




// 配置路由映射 （不同的路由对应渲染不同的页面组件）
const router = [
    {
    path: "/",
    element: <AntX />,
  },

  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/home",
    element: <Index />,
    children: [
      {
        // 默认嵌套路由
        index: true,
        element: <IndexDetail />,
      },
      {
        path: "about",
        element: <About />,
      },
      {
        path: "userInfo",
        element: <UserInfo />,
      },
    ],
  },
    {
    path: "*",
    element: <NotFound />,
  },
];

export default router;
